<?php
	$CI =& get_instance();
	$sBasePath = public_base_url().'js/fckeditor/';
?>
<script language="JavaScript" type="text/javascript">
	$(document).ready(function() {
		$('#sysuser_form').validate();
		$('#check_all').click(function(){
			if($(this).attr("checked") === 'true'){
				$("input.checkbox[type=checkbox]").attr('checked','false');
			}else{
				$("input.checkbox[type=checkbox]").attr('checked','true');
			}
		});
	});
</script>

<h2>Add CMS User</h2>
<div class="content-inner">
	<form action="<?=site_url(array('c' => 'cms_system', 'm' => 'edit','id'=>$user['id']))?>" enctype="multipart/form-data" method="post" id="sysuser_form">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="form-table">
		<tbody>
			<tr>
				<th width="120">Username: </th>
				<td><input type="text" name="item_name" class="input-text" value="<?=$user['name']?>"></td>
			</tr>
			<tr>
				<th>Password: </th>
				<td>
					<input type="text" name="item_pass" class="input-text" value="<?=$user['pass']?>">
				</td>
			</tr>
			<tr>
				<th>Email: </th>
				<td>
					<input type="text" name="item_email" class="input-text" value="<?=$user['email']?>">
				</td>
			</tr>
			<tr>
				<th>Actions</th>
				<td>
					<table width="350" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td><input type="checkbox" name="check_all" id="check_all" value="1"> Select All (Administrator) </td>
							<td><input type="checkbox" name="item_pms_suser"  value="1" class="checkbox" <?=$user['pms_suser']==1?'checked':''?>> CMS User</td>
						</tr>
						<tr>
							<td><input type="checkbox" name="item_pms_news"  value="1" class="checkbox" <?=$user['pms_news']==1?'checked':''?>> News & Event</td>
							<td><input type="checkbox" name="item_pms_data" value="1" class="checkbox" <?=$user['pms_data']==1?'checked':''?>> File Download</td>
						</tr>
						<tr>
							<td><input type="checkbox" name="item_pms_career"  value="1" class="checkbox" <?=$user['pms_career']==1?'checked':''?>> Careers</td>
							<td><input type="checkbox" name="item_pms_gallery" value="1" class="checkbox" <?=$user['pms_gallery']==1?'checked':''?>> Gallery</td>
						</tr>
						<tr>
							<td><input type="checkbox" name="item_pms_setting"  value="1" class="checkbox" <?=$user['pms_setting']==1?'checked':''?>> CMS Setting</td>
							<td><input type="checkbox" name="item_pms_option"  value="1" class="checkbox" <?=$user['pms_option']==1?'checked':''?>> CMS Option</td>
						</tr>
						<tr>
							<td><input type="checkbox" name="item_pms_node" value="1" class="checkbox" <?=$user['pms_node']==1?'checked':''?>> Page Node</td>
							<td><input type="checkbox" name="item_pms_content" value="1" class="checkbox" <?=$user['pms_content']==1?'checked':''?>> Page Content</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>
					<input type="button" class="input-button" onClick="javascript:history.back();" value="Cancel">
					<input name="Submit" type="submit" class="ins" value="Save"></td>
			</tr>
		</tbody>
	</table>
	</form>
</div>

